package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * 人群特征条件
 * @Author: wangzh
 * @Date: 2022/9/27 17:33
 */
public enum CrowdCharacteristicsConditionEnum implements IEnum<Integer> {

    //判断条件(0: 等于 1:大于 2: 小于 3: 区间 4: 会员等级 5: 付费会员)

    EQUAL(0, "等于"),

    GREATER_THAN(1, "大于"),

    LESS_THAN(2, "小于"),

    SECTION(3, "区间"),

    VIP_LEVEL(4, "会员等级"),

    PAY_VIP(5, "付费会员")
    ;


    private final Integer code;
    private final String msg;

    public static CrowdCharacteristicsConditionEnum valueOf(Integer code){
        for (CrowdCharacteristicsConditionEnum value : values()){
            if(value.getCode() == code){
                return value;
            }
        }
        return null;
    }

    CrowdCharacteristicsConditionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
